
using Infrastructure.Extensions;
using ZR.Model.Enums;

namespace ZR.Model.Dev.Entity
{
    /// <summary>
    /// 系统菜单
    /// </summary>
    [SugarTable("sys_menu")]
    public class MenuEntity
    {
        /// <summary>
        /// 菜单ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public long MenuId { get; set; }

        /// <summary>
        /// 上级菜单
        /// </summary>
        public long ParentId { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        public string MenuType { get; set; }

        /// <summary>
        /// 菜单名称
        /// </summary>
        public string MenuName { get; set; }= string.Empty;

        /// <summary>
        /// 显示顺序
        /// </summary>
        public int OrderNum { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        public string Icon { get; set; }

        /// <summary>
        /// 路由参数
        /// </summary>
        public string Query { get; set; }

        /// <summary>
        /// 显示状态（0显示 1隐藏）
        /// </summary>
        public string Visible { get; set; }

        /// <summary>
        /// 是否外链
        /// </summary>
        public int? IsFrame { get; set; }

        /// <summary>
        /// 路由地址
        /// </summary>
        public string Path { get; set; }

        /// <summary>
        /// 组件路径
        /// </summary>
        public string Component { get; set; }

        /// <summary>
        /// 是否缓存（1不缓存 0缓存）
        /// </summary>
        public int? IsCache { get; set; }

        /// <summary>
        /// 菜单状态
        /// </summary>
        public string Status { get; set; }

        /// <summary>
        /// 权限字符串
        /// </summary>
        public string Perms { get; set; }

        /// <summary>
        /// 菜单名key
        /// </summary>
        [SugarColumn(ColumnName = "menuName_key")]
        public string MenunameKey { get; set; }

        /// <summary>
        /// 路由名
        /// </summary>
        public string RouteName { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [SugarColumn(ColumnName = "create_by")]
        public string CreateBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "create_time")]
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 更新人
        /// </summary>
        [SugarColumn(ColumnName = "update_by")]
        public string UpdateBy { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [SugarColumn(ColumnName = "update_time")]
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// remark
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 菜单ID路径
        /// </summary>
        public string MenuIdPath { get; set; }

    }
}